import request from '@/utils/request';

export function fetchAllOp(token) {
    return request({
        url: '/op/list',
        method: 'get',
        params: {
            token: token
        }
    });
}

export function addOp(token, op) {
    return request({
        url: '/op/add',
        method: 'post',
        data: op,
        params: {
            token: token
        }
    });
}

export function renewOp(op) {
    return request({
        url: '/op/renew',
        method: 'post',
        data: op
    });
}

export function removeOp(opId) {
    return request({
        url: '/op/remove',
        method: 'post',
        params: {
            opId: opId
        }
    });
}
